package default_package;

import java.io.*;  


public class make_data_set
{
	public static void main(String[] args) throws IOException
	{
		BufferedReader br_twitt, br_pos, br_neg;
		BufferedWriter wr;
		String read_morp, pos, neg;
		
		int write_cnt = 0 , flag = 0;
	
		br_twitt = new BufferedReader(new FileReader("twitt_result.txt"));
		
		wr = new BufferedWriter(new FileWriter("test.txt"));
		
		while(true)
		{
			read_morp = br_twitt.readLine();
	
			if(read_morp == null )
				break;
			
			read_morp = read_morp.split(" ")[0];
			
			write_cnt++;
			
			if(read_morp.equals("EOS"))
			{
				wr.write("\n");
				write_cnt = 0;
			}
			
			br_pos = new BufferedReader(new FileReader("positive.txt"));
			
			while(flag==0)
			{
				
				pos = br_pos.readLine();
				if(pos == null )
					break;
				
				if(read_morp.equals(pos))
				{
					wr.write(write_cnt+":"+"1 ");
					
				}
			
			}
			
			br_pos.close();
			
			br_neg = new BufferedReader(new FileReader("negative.txt"));
			
			while(flag==0)
			{
				neg = br_neg.readLine();
			
				if(neg == null)
					break;
				
				if(read_morp.equals(neg))
				{
					wr.write(write_cnt+":"+"-1 ");
				}

			}
			
			br_neg.close();
		}
		
		br_twitt.close();
		wr.close();
	}
}
